﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
using MyCommerce.Windows.Reports.Reportes;
using Innova.Microfinanzas.BusinessEntities.SystemEnums;

namespace MyCommerce.Windows.Reports.Views
{
    public partial class ReportViewer : Form
    {
        private DataTable vDataTableSource = null;

        public ReportViewer()
        {
            InitializeComponent();
        }

        public ReportViewer(object reportType, DataTable reportData)
        {
            InitializeComponent();

            if (reportType == null)
                throw new Exception("reportType");


            ReportClass y = (ReportClass)reportType;
            y.SetDataSource(reportData);
            viewerReport.ReportSource = y;
            viewerReport.Show();
        }
    }
}
